import request from '@/utils/request'

/**
 * 换货明细分页查询
 * @param {查询条件} data
 */
export function listExchangedetail(query) {
  return request({
    url: 'order/Exchangedetail/list',
    method: 'get',
    params: query,
  })
}

/**
 * 新增换货明细
 * @param data
 */
export function addExchangedetail(data) {
  return request({
    url: 'order/Exchangedetail',
    method: 'post',
    data: data,
  })
}
/**
 * 修改换货明细
 * @param data
 */
export function updateExchangedetail(data) {
  return request({
    url: 'order/Exchangedetail',
    method: 'PUT',
    data: data,
  })
}
/**
 * 获取换货明细详情
 * @param {Id}
 */
export function getExchangedetail(id) {
  return request({
    url: 'order/Exchangedetail/' + id,
    method: 'get'
  })
}

/**
 * 删除换货明细
 * @param {主键} pid
 */
export function delExchangedetail(pid) {
  return request({
    url: 'order/Exchangedetail/delete/' + pid,
    method: 'POST'
  })
}
